//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CmsModelFields, CmsModelFieldsResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCmsModelFieldsList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CmsModelFieldsResponse>(`/uctoo/cms_model_fields/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCmsModelFields = async (id: string) => {
  return requestClient.get<CmsModelFields>(`/uctoo/cms_model_fields/${id}`);
};

export const adductooCmsModelFields = async (data: Partial<CmsModelFields>) => {
  return requestClient.post<CmsModelFields>('/uctoo/cms_model_fields/add', data);
};

export const edituctooCmsModelFields = async (data: Partial<CmsModelFields>) => {
  return requestClient.post<CmsModelFields>('/uctoo/cms_model_fields/edit', data);
};

export const deleteuctooCmsModelFields = async (id: string) => {
  return requestClient.post<any>('/uctoo/cms_model_fields/del', { id });
};
